# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Alexey Min <alexey.min@gmail.com>
pkgname=device-xiaomi-lavender
pkgdesc="Xiaomi Redmi Note 7"
pkgver=3
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
	firmware-xiaomi-lavender
	firmware-qcom-adreno-a530
	mkbootimg
	msm-firmware-loader
	postmarketos-base
	soc-qcom-sdm660
	soc-qcom-sdm660-rproc
"
makedepends="devicepkg-dev"
subpackages="
	$pkgname-kernel-boe:kernel_boe
	$pkgname-kernel-tianma:kernel_tianma
"
source="
	deviceinfo
	modules-initfs.boe
	modules-initfs.tianma
"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

kernel_boe() {
	pkgdesc="For Redmi Note 7 with BOE panel"
	depends="linux-postmarketos-qcom-sdm660"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}

kernel_tianma() {
	pkgdesc="For Redmi Note 7 with Tianma panel"
	depends="linux-postmarketos-qcom-sdm660"
	devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
sha512sums="
b65e5548b4dd48246d3367c0e60029e5f17d6c4295156b1eff308c1e44793f864f2bcf45ebc52d9679e2b7d667d2eb4d58049c6897a5a6ffebf348672ec6e7fd  deviceinfo
77f0b637ca0d6512da7964425c08f0b8c2d8ac40b784301055fc70769d15989713388dd098ee9ee89520a52ead96283f9898da6d87b6e0e70143ce5859f9b61b  modules-initfs.boe
2985ce67fe3a5cd4cd03c9c5e7af072174775a97b4d26c40b025a82b33fead69f7cb4ac185db1b7b97d61b02ebdf56c88f77f55d2dd352ac2d7e47394563dbe2  modules-initfs.tianma
"
